package com.yanqu.road.entity.activity.silkroad.config;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.utils.property.Property;
import com.yanqu.road.utils.property.PropertyHelper;

import java.util.ArrayList;
import java.util.List;

@FieldTypeAnnotation(tableName = "t_s_activity_silkroad_place")
public class SilkRoadPlaceConfig {
    @FieldTypeAnnotation(select = true, orderASC = true, isIndex = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "地点id", isIndex = true)
    private int id;

    @FieldTypeAnnotation(desc = "地点名称")
    private String name;

    @FieldTypeAnnotation(desc = "地点描述")
    private String desc;

    @FieldTypeAnnotation(desc = "地点图标")
    private String icon;

    @FieldTypeAnnotation(desc = "地点坐标")
    private String placeCoordinate;

    @FieldTypeAnnotation(desc = "路线点坐标")
    private String routeCoordinateLists;

    @FieldTypeAnnotation(desc = "事件描述")
    private String eventDesc;

    @FieldTypeAnnotation(desc = "奖励")
    private String rewards;

    private List<List<Property>> rewardsList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "特殊奖励")
    private String specialRewards;

    private List<List<Property>> specialRewardsList = new ArrayList<>();

    int routeSize; //路线点的数量

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getPlaceCoordinate() {
        return placeCoordinate;
    }

    public void setPlaceCoordinate(String placeCoordinate) {
        this.placeCoordinate = placeCoordinate;
    }

    public String getRouteCoordinateLists() {
        return routeCoordinateLists;
    }

    public void setRouteCoordinateLists(String routeCoordinateLists) {
        this.routeCoordinateLists = routeCoordinateLists;
    }

    public String getEventDesc() {
        return eventDesc;
    }

    public void setEventDesc(String eventDesc) {
        this.eventDesc = eventDesc;
    }

    public String getRewards() {
        return rewards;
    }

    public void setRewards(String rewards) {
        this.rewards = rewards;
        this.rewardsList = PropertyHelper.parseNewStringToPropertyList(rewards);
    }

    public String getSpecialRewards() {
        return specialRewards;
    }

    public void setSpecialRewards(String specialRewards) {
        this.specialRewards = specialRewards;
        this.specialRewardsList = PropertyHelper.parseNewStringToPropertyList(specialRewards);
    }

    public int getRouteSize() {
        return routeSize;
    }

    public void setRouteSize(int routeSize) {
        this.routeSize = routeSize;
    }

    public List<List<Property>> getRewardsList() {
        return new ArrayList<>(rewardsList);
    }

    public List<List<Property>> getSpecialRewardsList() {
        return new ArrayList<>(specialRewardsList);
    }
}
